Many Android applications need to retrieve data from a Content Provider instead of strait from a file. The ASTRO file manager creates a wrapper around the file system allowing any file to be loaded through a content provider. It also maps file extensions to mime types, allowing any file to be passed to any activity that has an appropriate mime type defined.
For example, a PNG file can be sent to any activity that has the mime type "image/png" defined in its <intent-filter>. This could include the built in Picture viewer as well as the alternative Image viewer included in ASTRO.
If you wanted to make an Activity that could view any image file, you could use the following intent filter:
<intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="image/*" /> </intent-filter> |
Copyright 2008 Metago Inc. metago.inc@gmail.com